﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ViewModel;

namespace IssueTracker.CustomControls
{
    public partial class popup_NewIssueTemplate : UserControl
    {
        Issue obj = null;
        public popup_NewIssueTemplate(Issue item)
        {
            InitializeComponent();
            obj = item;
        }

        private void popup_newIssueAssigned_Load(object sender, EventArgs e)
        {
            this.BackColor = System.Drawing.ColorTranslator.FromHtml(obj.Priority.GetColor());
            lblTitle.Text = obj.DisplayText;
            //lblTitle.Tag = obj.Description;
            lblPriority.Text = obj.Priority.ToString();
            lblDateRange.Text = obj.DisplayDateRange;
        }

        private void lblTitle_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start(obj.Description);
        }
    }
}
